<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="forms/error.jsp"%>

<%@page import="df.jsp.Guard"%>
<%@page import="df.jsp.LabelMap"%>
<%@page import="df.bean.db.conn.DBConn"%>
<%@ include file="_global.jsp" %>

<%
            //
            // Verify permission
            //

            if (!Guard.checkPermission(session, Guard.PAGE_ROOT)) {
                response.sendRedirect("loginform.jsp");
                return;
            }
            
            String lang = session.getAttribute("LANG_CODE").toString();
            LabelMap labelMap = new LabelMap(session.getAttribute("LANG_CODE").toString());
            
            DBConn conn = new DBConn();
            conn.setStatement();
            String qHos = "SELECT DESCRIPTION_"+ labelMap.getFieldLangSuffix() +" FROM HOSPITAL WHERE CODE='"+ session.getAttribute("HOSPITAL_CODE").toString() +"'";
            String[][] arrHos = conn.query(qHos);
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
	    <title><%=labelMap.get("PAGE_TITLE")+" <-"+arrHos[0][0]+"-> Version 1.0"%></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <LINK href="search_include/osstyle.css" type=text/css rel=stylesheet>
        <script language=JavaScript1.2 src="search_include/apopwin.js"></script>
        <script language="JavaScript" type="text/javascript">
            var origCols = true;
            var xw = screen.availWidth;
            var xwMenuFrame = 250;
            var xwSearchFrame = 0;
            var xwMainFrame = '*';
            var searchOpen = "";
            
            var milisec=0;
            var seconds=0;

            function toggleFrame() {
                if (origCols) {
                    hideFrame();
                    origCols = false;
                    topFrame.changeLableMenu(false);
                } else {
                    showFrame();
                    origCols = true;
                    topFrame.changeLableMenu(true);
                }
            }
            function hideFrame() {
                var frameset = document.getElementById("controlFrame");
                xwMenuFrame = 0;
                if(xwSearchFrame>0) xwSearchFrame = xwSearchFrame + 250;
                frameset.cols = ""+xwMenuFrame+","+xwSearchFrame+", *";
                if(xwSearchFrame>0) xwSearchFrame = xwSearchFrame - 250;
            }

            function showFrame() {
                var frameset = document.getElementById("controlFrame");
                xwMenuFrame = 250;
                frameset.cols = ""+xwMenuFrame+","+xwSearchFrame+", *";
            }
            
            function OpenSearch(dt){
                var frameset = document.getElementById("controlFrame");
                var urlFrame = document.getElementById("FrameSearch");
                dt = dt.replace("../","./forms/") ;
                xwSearchFrame = xw-xwMenuFrame;
                if(dt==searchOpen){
                    frameset.cols = ""+xwMenuFrame+","+xwSearchFrame+",*";
                }else{
                    searchOpen = dt;
                    urlFrame.src = dt;
                    frameset.cols = ""+xwMenuFrame+","+xwSearchFrame+",*";
                }
            }
            function CloseSearch(){
                var frameset = document.getElementById("controlFrame");
                xwSearchFrame = 0;
                frameset.cols = ""+xwMenuFrame+","+xwSearchFrame+", *";
            }

            //for load first page
        	function onLoadPage(id){
        		var f = document.getElementById("mainFrame");
        		if(id=='5'){
            		f.src = "./forms/report/df_report.jsp";
        		}
        	}            
        </script>        
    </head>

    <frameset rows="130,*" cols="*" frameborder="no" border="0" framespacing="0">
        <frame src="header.jsp" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" />
        <frameset rows="*" cols="250,0,*" id="controlFrame" name="controlFrame" framespacing="0" frameborder="no" border="0">
            <frame src="menu.jsp" name="leftFrame" noresize="noresize" id="leftFrame" title="leftFrame" />
            <frame src="FrameSearch.jsp" name="FrameSearch" noresize="noresize" id="FrameSearch" title="FrameSearch" />
            <frame src="./forms/process/ProcessFlow.jsp" name="mainFrame" id="mainFrame" title="mainFrame" />
            <noframes>
                <body></body>
            </noframes>
        </frameset>
        <noframes>
            <body></body>
        </noframes>
    </frameset>
</html>
